﻿using System;
using UnityEngine;

public class LevelEditorOnlyComponents : MonoBehaviour
{
    public Component[] comps;

    private void Start()
    {
        if (!GameUtility.isLevelEditorScene)
        {
            foreach (Component component in this.comps)
            {
                if (component is Behaviour)
                {
                    (component as Behaviour).enabled = false;
                }
                else if (component is Collider)
                {
                    (component as Collider).enabled = false;
                }
                else if (component is Renderer)
                {
                    (component as Renderer).enabled = false;
                }
            }
        }
    }
}

